﻿using Autofac;
using IRepositories;
using IRepositories.BASE;
using iService;
using Repositories;
using Repositories.BASE;
using Service;
using swiftCode.Bbs.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using myModule = swiftCode.Bbs.Model.Model.Module;

namespace SwiftCode.BBS.Extensions.ServiceExtensions
{
    public class AutofacModuleRegister : Autofac.Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            //builder.RegisterType<ArticleService>().As<IArticleService>();
            builder.RegisterType<PostService>().As<IPostService>();
            builder.RegisterType<BanRecordService>().As<IBanRecordService>();
            builder.RegisterType<UserService>().As<IUserService>();
            builder.RegisterType<ModuleService>().As<IModuleService>();
           
            builder.RegisterType<BanRecordRepositories>().As<IBanRecordRepositories>();
            builder.RegisterType<ModuleRepositories>().As<IModuleRepositories>();
            builder.RegisterType<PostRepositories>().As<IPostRepositories>();
            builder.RegisterType<UserRepositories>().As<IUserRepositories>();
        }
    }
}
